/*
 * Copyright (c) 2018-2999 九五云信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.yami.shop.dao;

import java.util.List;

import com.yami.shop.bean.model.Category;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

public interface CategoryMapper extends BaseMapper<Category> {

	List<Category> listByParentId(@Param("parentId") Long parentId, @Param("lang") Integer dbLang);

    List<Category> listThreeByParentId(@Param("parentId") Long parentId, @Param("lang") Integer dbLang);

    Long getParentCategoryByParentId(@Param("parentId") Long parentId);

    List<Category> categoryList(@Param("category") Category category);

    List<Category> listByLang(@Param("lang") Integer lang, @Param("maxGrade") Integer maxGrade,
                              @Param("parentId") Long parentId, @Param("status") Integer status, @Param("shopId") Long shopId);

    Category getCategory(@Param("categoryId") Long categoryId, @Param("shopId") Long shopId);

    Integer getCategoryName(@Param("category") Category category);
}
